package com.sora.controller;

import com.sora.result.Result;
import com.sora.service.SystemService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Classname SystemController
 * @Description 系统工具控制器
 * @Date 2024/07/15 16:10
 * @Author by Sora33
 */
@RestController
@RequestMapping("/system")
public class SystemController {

    private final SystemService systemService;

    public SystemController(SystemService systemService) {
        this.systemService = systemService;
    }

    @RequestMapping("/ocr")
    public Result OCR(@RequestParam(value = "file", required = false) MultipartFile multipartFile) {
        return systemService.ocr(multipartFile);
    }
}
